﻿<%@ page 
language="java" 
import="java.util.*" 
import="com.csd.helper.IConstant"
import="com.csd.vo.UserVO"
import="com.csd.pojo.*"
pageEncoding="UTF-8"
%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
HttpSession s = request.getSession();
String stage = request.getParameter("stage");
UserVO uvo =  (UserVO)s.getAttribute(IConstant.userVO);
if(uvo==null)
{
	response.sendRedirect(path);
}

Team team = (Team)request.getAttribute("team");

if(team == null)
{
	response.sendRedirect(path);
}

Set<Student> memberList = team.getMembers();
String projectID = (String)request.getAttribute("projectID");

String returnpage = (String)request.getAttribute("returnpage");

%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>团队表</title>
<link href="<%=path %>/student/css/student_right.css" rel="stylesheet" type="text/css" />
</head>

<body>
	<div class="main">
    	<h1><%=team.getName() %>的团队组成</h1>
        <hr />
        <h3>&nbsp;</h3>
        <table width="100%">
            <tr>
                <td class="table_head" width="50px">队长</td>
                <td class="table_head" width="100px">学号</td>
                <td class="table_head" width="100px">姓名</td>
                <td class="table_head" width="100px">专业</td>
                <td class="table_head" width="100px">年级</td>
                <td class="table_head">邮箱</td>
            </tr>
            <%
            if(memberList!=null || memberList.size()>0){
            	Integer leaderid = team.getLeader().getId();
            	for(Student i : memberList){
            %>
            <tr>
            	<%
            		if(leaderid.equals(i.getId()))
            		{
            	%>
                <td>是</td>
                <%	}else{ %>
                <td>&nbsp;</td>
                <%	} %>
                <td><%=i.getSno() %></td>
                <td><%=i.getName() %></td>
                <td><%=i.getMajor() %></td>
                <td><%=i.getGrade() %></td>
                <td><%=i.getEmail() %></td>
            </tr>
            <%	}
            }else{
            %>            
            <tr>
                <td align="center" colspan="6">暂无</td>
            </tr>
            <%} %>
      </table>
      <br />
       <a href="<%=path %>/projectInfoShow.action?projectID=<%=projectID %>&stage=<%=stage %>&returnpage=<%=returnpage %> ">返回</a>
	</div>
</body>
</html>

